package com.dandelion.business.service;

import com.dandelion.business.entity.SysMenu;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dandelion.business.entity.vo.login.resp.Menu;
import com.dandelion.business.entity.vo.menu.req.MenuReqVO;
import com.dandelion.business.entity.vo.user.CurrentUser;
import com.dandelion.framework.common.R;

import java.util.List;

/**
 * <p>
 * 菜单表 服务类
 * </p>
 *
 * @author 宋发准
 * @since 2021-12-26
 */
public interface ISysMenuService extends IService<SysMenu> {

    /**
     * 菜单列表
     *
     * @param userId 用户id
     * @return {@link List}<{@link Menu}>
     */
    R<List<Menu>>menuList(Long userId);

    /**
     * 添加
     *
     * @param req 要求事情
     * @param currentUser  铜
     * @return {@link R}
     */
    R<Boolean> add(CurrentUser currentUser, MenuReqVO req);

    /**
     * 获取菜单
     *
     * @param id id
     * @return {@link R}
     */
    R<SysMenu> queryMenu(Long id);

    /**
     * 编辑
     *
     * @param currentUser  铜
     * @param req 要求事情
     * @return {@link R}
     */
    R<Boolean> edit(CurrentUser currentUser, MenuReqVO req);
}
